#region (c) 2009 Rinat Abdullin

// Copyright (c) Rinat Abdullin
// All Rights Reserved
// Site: http://abdullin.com

#endregion

using System;
using NCouch.Model;

namespace NCouch.Json
{
	public static class JayrockSerializerExtensions
	{
		public static JayrockSerializer WithCSharpModel<T>(this JayrockSerializer serializer)
		{
			serializer.RegisterCSharpModel(typeof (T));
			return serializer;
		}

		public static JayrockSerializer WithFSharpModel<T>(this JayrockSerializer serializer)
		{
			serializer.RegisterFSharpModel(typeof(T));
			
			serializer.RegisterCSharpModel(typeof(View<Guid,T>));
			serializer.RegisterCSharpModel(typeof(Row<Guid,T>));
			return serializer;
		}
	}
}